/* =====================================================
   RSS Reader AI - 全局样式
   ===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  height: 100vh;
  background-color: #f5f5f5;
}

#root {
  width: 100%;
  height: 100vh;
}

/* =====================================================
   滚动条美化
   ===================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* =====================================================
   文章内容样式优化
   ===================================================== */
.article-content {
  line-height: 1.8;
  color: #333;
  word-wrap: break-word;
  word-break: break-word;
}

/* 段落样式 */
.article-content p {
  margin-bottom: 20px;
  text-align: justify;
}

/* 标题样式 - 层级清晰,视觉效果更好 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  scroll-margin-top: 80px; /* 锚点跳转时留出顶部空间 */
}

.article-content h1 {
  font-size: 28px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 3px solid #1890ff;
  color: #000;
}

.article-content h2 {
  font-size: 24px;
  padding-left: 14px;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-left: 5px solid #1890ff;
  color: #1a1a1a;
}

.article-content h3 {
  font-size: 20px;
  color: #262626;
  border-bottom: 2px solid #e8e8e8;
  padding-bottom: 8px;
}

.article-content h4 {
  font-size: 18px;
  color: #595959;
  padding-left: 10px;
  border-left: 3px solid #91d5ff;
}

.article-content h5,
.article-content h6 {
  font-size: 16px;
  color: #8c8c8c;
}

/* 图片样式 - 更自然的显示,不突兀 */
.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 30px auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.article-content img:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
}

.article-content a {
  color: #1890ff;
  text-decoration: none;
  border-bottom: 1px solid #91d5ff;
  transition: all 0.2s;
}

.article-content a:hover {
  color: #40a9ff;
  border-bottom-color: #40a9ff;
}

.article-content code {
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  color: #e83e8c;
}

.article-content pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid #e8e8e8;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: #262626;
}

.article-content blockquote {
  border-left: 4px solid #1890ff;
  padding-left: 16px;
  margin: 16px 0;
  color: #595959;
  font-style: italic;
  background: #f9f9f9;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
}

/* 列表样式 - 增强可读性,更清晰的层级 */
.article-content ul,
.article-content ol {
  padding-left: 32px;
  margin: 20px 0;
  line-height: 1.8;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 12px;
  line-height: 1.9;
  padding-left: 10px;
  color: #333;
}

.article-content li p {
  margin-bottom: 8px;
}

/* 嵌套列表 - 更明显的层级区分 */
.article-content ul ul,
.article-content ol ul,
.article-content ul ol,
.article-content ol ol {
  margin-top: 10px;
  margin-bottom: 10px;
  padding-left: 24px;
}

.article-content ul ul {
  list-style-type: circle;
}

.article-content ul ul ul {
  list-style-type: square;
}

.article-content ol ol {
  list-style-type: lower-alpha;
}

.article-content ol ol ol {
  list-style-type: lower-roman;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.article-content table th,
.article-content table td {
  border: 1px solid #e8e8e8;
  padding: 12px;
  text-align: left;
}

.article-content table th {
  background: #fafafa;
  font-weight: 600;
}

.article-content table tr:hover {
  background: #f9f9f9;
}

.article-content hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 24px 0;
}
